@model SupplyChainWeb.Models.ChangePasswordModel
@{ Layout = "~/Views/Shared/_lightLayout.cshtml"; }

<div class="accountHeader">
    <h2>Change Password</h2>
    <p>Use the form below to change your password.</p>
    <p style="color:red">@ViewBag.ErrorMessage</p>
</div>
@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.DevExpress().TextBoxFor(m => m.OldPassword, tb => {
        tb.Properties.Caption = "Old Password";
        tb.Properties.Password = true;
        tb.Properties.CaptionSettings.Position = EditorCaptionPosition.Top;
        tb.ShowModelErrors = true;
        tb.Properties.ValidationSettings.Display = Display.Dynamic;
        tb.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
        tb.Properties.ValidationSettings.ErrorTextPosition = ErrorTextPosition.Bottom;
    }).GetHtml()
    
    @Html.DevExpress().TextBoxFor(m => m.NewPassword, tb => {
        tb.Properties.Caption = "New Password";
        tb.Properties.Password = true;
        tb.Properties.CaptionSettings.Position = EditorCaptionPosition.Top;
        tb.ShowModelErrors = true;
        tb.Properties.ValidationSettings.Display = Display.Dynamic;
        tb.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
        tb.Properties.ValidationSettings.ErrorTextPosition = ErrorTextPosition.Bottom;
    }).GetHtml()
                
    @Html.DevExpress().TextBoxFor(m => m.ConfirmPassword, tb => {
        tb.Properties.Caption = "Confirm Password";
        tb.Properties.Password = true;
        tb.Properties.CaptionSettings.Position = EditorCaptionPosition.Top;
        tb.ShowModelErrors = true;
        tb.Properties.ValidationSettings.Display = Display.Dynamic;
        tb.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.Text;
        tb.Properties.ValidationSettings.ErrorTextPosition = ErrorTextPosition.Bottom;
    }).GetHtml()
    <br />
    @Html.DevExpress().Button(b => {
        b.Name = "Button";
        b.Text = "Change Password";
        b.UseSubmitBehavior = true;
    }).GetHtml()
}